﻿@model PagedList.IPagedList<Test710.Models.Tournament>
@using PagedList.Mvc; 
@{
    ViewBag.Title = "Index";
    Layout = "~/Views/Layout.cshtml";
}

<h2>Index</h2>

<p>
    @Html.ActionLink("Create New", "Create",null,new {@class="actionlink" })
</p>
<table class="flat-table flat-table-3">
    <tr>
       @* <th>
            @Html.DisplayNameFor(model => model.TournamentsId)
        </th>*@
        <th>
            Tên Giải
        </th>
        <th>
            SeaSon
        </th>
        <th>
            Association
        </th>
        @*<th>
            @Html.DisplayNameFor(model => model.State)
        </th>*@
        <th>
            Soccertype
        </th>
        <th>
            NumberOfRound
        </th>
        <th>
            StartDate
        </th>
        <th>
            EndDate
        </th>
        <th></th>
    </tr>

@foreach (var item in Model) {
    <tr>
        @*<td>
            @Html.DisplayFor(modelItem => item.TournamentsId)
        </td>*@
        <td>
            @*@Html.DisplayFor(modelItem => item.TournamentsName)*@
            @Html.ActionLink(item.TournamentsName, "Details", new { id = item.TournamentsId }, new { @class="actionlink"})
        </td>

        <td>
            @Html.DisplayFor(modelItem => item.Season)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.Association)
        </td>
       @* <td>
            @Html.DisplayFor(modelItem => item.State)
        </td>*@
        <td>
            @Html.DisplayFor(modelItem => item.Soccertype)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.NumberOfRound)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.StartDate)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.EndDate)
        </td>
        <td>
           @*@Html.ActionLink("Edit", "Edit", new { id=item.TournamentsId  }, new { @class="actionlink"})*@
            @*@Html.ActionLink("Details", "Details", new { id = item.TournamentsId }, new { @class="actionlink"})*@
            @Html.ActionLink("Delete", "Delete", new { id = item.TournamentsId }, new { @class ="actionlink"})
        </td>
    </tr>
}

</table>
Page @(Model.PageCount < Model.PageNumber ? 0 : Model.PageNumber) of @Model.PageCount

@Html.PagedListPager( Model, page => Url.Action("Index", new { page, sortOrder = ViewBag.CurrentSort, currentFilter=ViewBag.CurrentFilter }) )